package edu.xlh.travel.controller.admin;

import edu.xlh.travel.common.Result;
import edu.xlh.travel.service.EchartService;
import edu.xlh.travel.syslog.annontion.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/echart")
public class EchartController {
    @Autowired
    private EchartService echartService;

    @Log("获取实时数据")
    @RequestMapping("/getRealTimeData")
    @ResponseBody
    public Result getRealTimeData(HttpSession session) {
        return echartService.getRealTimeData(session);
    }

    @Log("获取上周统计数据")
    @RequestMapping("/getLastWeekReport")
    @ResponseBody
    public Result getLastWeekReport(HttpSession session) { return echartService.getLastWeekReport(session); }
}
